#ifndef STREAM_RETRIEVE_H
#define STREAM_RETRIEVE_H

#include "Infra/Thread.h"
#include "GenICam/StreamSource.h"
#include <opencv2/opencv.hpp>

class StreamRetrieve : public Dahua::Infra::CThread
{
public:

    StreamRetrieve(Dahua::GenICam::IStreamSourcePtr& streamSptr);

    cv::Mat originImage_;

    cv::Mat matImage_;

    bool start();

    void stop();

    cv::Mat getMatImage();

private:

    void threadProc();

    bool m_isLoop;

    Dahua::GenICam::IStreamSourcePtr m_streamSptr;

    void imageConvert(Dahua::GenICam::CFrame& input, cv::Mat& originPut, cv::Mat& output);

};
#endif